//2009/08/19 14:42:00
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class SpeedTyper
{
public:
    string lettersToPractice(string letters, vector <int> times)
    {
		string s;
		int aver = times[times.size() - 1] / times.size();
		if(times[0] > aver) s += letters[0];
		for(int i=1; i<times.size(); i++)
		{
			if(times[i] - times[i-1] > aver )
				s += letters[i];
		}
		return s;
    }
};
